<?php

namespace app\logic;

class L_package
{
    /**
     * 获取信息
     */
    public function info()
    {
        $return=array();
        $packageFile=YIFANG_VERSION."/package";
        if(is_file($packageFile)){
            $versionContent=file_get_contents($packageFile);
            if($versionContent){
                $versionContent=array_filter(explode("\n",str_replace("\r","",$versionContent)));
                if($versionContent){
                    foreach($versionContent as $val){
                        $tmp=array_pad(explode("=",$val),2,"");
                        $return[$tmp[0]]=$tmp[1];
                    }
                }
            }
        }
        return $return;
    }
}